import { EStatusLoading } from ':/defined/status';

export function hasLoading(...statusList: EStatusLoading[]) {
  return statusList.some(item => item === EStatusLoading.LOADING);
}

export function hasError(...statusList: EStatusLoading[]) {
  return statusList.some(item => item === EStatusLoading.ERROR);
}

export function allLoaded(...statusList: EStatusLoading[]) {
  return statusList.every(item => item === EStatusLoading.LOADED);
}